<%@ Page Title="" Language="C#" MasterPageFile="~/Themes/Default/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<% =Html.Resource("Warehouse","TITLE_EDITWAREHOUSE") %>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2><% =Html.Resource("Warehouse","TITLE_EDITWAREHOUSE") %></h2>
        <form id="form1" action="/Warehouse/Create" method="post">
        <div class="tabcontainer">
            <input type="submit" value="<% =Html.Resource("Global","SAVE") %>" name="btnSave" class="button" accesskey="S"/>
            <input type="button" value="<% =Html.Resource("Global","CLEAR") %>" name="btnClear" class="button" accesskey="C"/>
            <input type="button" value="<% =Html.Resource("Global","CANCEL") %>" name="btnCancel" class="button" accesskey="X" onclick="redirectToAction('Warehouse','Index')"/>
            
        </div>
          <% =Html.RenderForm(ViewData.Model) %>
         <div class="tabcontainer">
            <input type="submit" value="<% =Html.Resource("Global","SAVE") %>" name="btnSave" class="button" accesskey="S"/>
            <input type="button" value="<% =Html.Resource("Global","CLEAR") %>" name="btnClear" class="button" accesskey="C"/>
            <input type="button" value="<% =Html.Resource("Global","CANCEL") %>" name="btnCancel" class="button" accesskey="X" onclick="redirectToAction('Warehouse','Index')"/>
        </div>
        </form>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="HeadContent" runat="server">
<%=Html.jQueryValidateScriptInclude() %>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="PostScript" runat="server">
    <script type="text/javascript" language="javascript">
        $(document).ready(function() {
            $("#form1").validate({
                rules: {
                    warehouseCode: {
                        required: true,
                        minlength: 2,
                        maxlength: 10
                    },
                    warehouseName: {
                        required: true,
                        minlength: 2,
                        maxlength: 100
                    },
                    warehouseType: {
                        required: true
                    },
                    parentWarehouse_text: {
                        required: true
                    }
                }
            });
            $("input[name='btnClear']").click(function() { clearFormFields("#form1"); });
        });
    </script>
</asp:Content>